package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel(value = "销售明细")
@TableName("t_sale_detail")
public class SaleDetailBean {
    @ApiModelProperty(hidden = true)
    @TableId(value = "pk_saleDetailId",type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "成交价")
    @TableField("s_money")
    private Integer money;
    @ApiModelProperty(value = "销售数量")
    @TableField("s_saleNum")
    private Integer saleNum;
    @ApiModelProperty(value = "库存商品ID")
    @TableField("fk_shopId")
    private Integer shopId;
    @ApiModelProperty(value = "订单ID")
    @TableField("fk_orderId")
    private Integer orderId;

    @TableField(exist = false)
    private StockShopBean stockShop;

    public SaleDetailBean() {
    }

    public SaleDetailBean(Integer money, Integer saleNum, Integer shopId, Integer orderId, StockShopBean stockShop) {
        this.money = money;
        this.saleNum = saleNum;
        this.shopId = shopId;
        this.orderId = orderId;
        this.stockShop = stockShop;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public Integer getSaleNum() {
        return saleNum;
    }

    public void setSaleNum(Integer saleNum) {
        this.saleNum = saleNum;
    }

    public Integer getShopId() {
        return shopId;
    }

    public void setShopId(Integer shopId) {
        this.shopId = shopId;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public StockShopBean getStockShop() {
        return stockShop;
    }

    public void setStockShop(StockShopBean stockShop) {
        this.stockShop = stockShop;
    }

    @Override
    public String toString() {
        return "SaleDetailBean{" +
                "id=" + id +
                ", money=" + money +
                ", saleNum=" + saleNum +
                ", shopId=" + shopId +
                ", orderId=" + orderId +
                ", stockShop=" + stockShop +
                '}';
    }
}
